<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/media.css">
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        .header {
            width: 10rem;
            height: 2rem;
            background-color: pink;
        }

        .half {
            width: 5rem;
            height: 2rem;
            background-color: red;
        }

        .box {
            /* alt+z 可以实现px和rem的换算 */
            width: .8667rem;
            height: 2.6667rem;
            background-color: aqua;
        }
    </style>
</head>

<body>
    <!-- 宽度和屏幕宽度一致 -->
    <div class="header"></div>
    <!-- 宽度是屏幕宽度一半 -->
    <div class="half"></div>
    <div class="box"></div>
</body>

</html>